#ifndef __CMYBUS_PLAYER_H
#define __CMYBUS_PLAYER_H

#include "CMyGameBase.h"

using namespace cocos2d;

class GameLayer;

class CMyBusPlayer : public CMyGameBase
{
protected :
	bool m_bShield;
	float m_fShieldBeginTime;
	float m_fShieldDuration;
	int m_nBulletLevel;
	int m_nMaxFireBullet;
	bool m_bMoveOnIce;

public :
	CMyBusPlayer(GameLayer *pGame);
	virtual ~CMyBusPlayer(void);
	virtual bool init(void);
	virtual void updateObject(void);
	virtual bool canHit(void);
	void moveDir(int dir);
	void setMoveAni(void);
	void setSpawnAni(void);
	void setIdleAni(bool bSetAni = true);
	void setDamage(int dmg);
	bool canFireBullet(void);
	void setShield(bool bSet, float duration);
	bool isShield(void);
	void upgradeBullet(void);
	int getBulletLevel(void) { return m_nBulletLevel; }
	int getMaxFireBullet(void) { return m_nMaxFireBullet; }
	void setBulletLevel(int level);
	bool checkNextMove(void);
	bool alignToGrid(CCPoint *newPos, int dir);
};

#endif // __CMYBUS_PLAYER_H